package com.touwowo.eight;

import com.rabbitmq.client.Channel;
import com.touwowo.utils.RabbitMqUtils;

public class Consumer02 {
    private static final String DEAD_EXCHANGE = "dead_exchange";
    private static final String DEAD_QUEUE = "dead_queue";

    public static void main(String[] args) throws Exception {
        Channel channel = RabbitMqUtils.getChannel();
        channel.basicConsume(DEAD_QUEUE,true,(consumerTag, message) -> {
            System.out.println("死信队列的消息："+new String(message.getBody()));
        },consumerTag -> {});
    }
}
